Typos: Adherence to Go guidlines and typos#983
Open
CygnusMaximillian wants to merge 1 commit into
Open
Conversation
Signed-off-by: CygnusMaximillian <dprajjwal11@gmail.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #983 +/- ##
=========================================
- Coverage 10.99% 9.17% -1.82%
=========================================
Files 173 321 +148
Lines 8671 16081 +7410
=========================================
+ Hits 953 1475 +522
- Misses 7612 14472 +6860
- Partials 106 134 +28 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
NucleoFusion
approved these changes
Jun 9, 2026
NucleoFusion
left a comment
Contributor
There was a problem hiding this comment.
lgtm!
Thanks for the contribution!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔍 Overview
This PR continues the effort to standardize error message formatting across the codebase to adhere to the idiomatic Go Code Review Guidelines. Specifically, it ensures returned error strings are in lowercase and avoid ending punctuation.
Care was taken during this pass to only update standard text and strictly preserve all important capitalized acronyms/proper nouns (e.g., URL, Harbor, Ref) so that no pre-committed information or acronym capitalization is disrupted.
Fixes: #975
💡 Rationale
According to official Go guidelines:
"Error strings should not be capitalized (unless beginning with proper nouns or acronyms) or end with punctuation, since they are usually printed following other context."
These targeted changes resolve remaining capitalization style violations, resulting in cleaner and more idiomatic CLI error wrapping and logging.
🛠️ Changes Breakdown
Artifacts & Labels:
artifact/label/list.go — Standardized the missing argument error message.
Projects:
project/list.go — Standardized flag conflict errors.
project/member/update.go — Lowercased "no members found" errors.
Robot Accounts:
robot/create.go, robot/delete.go, robot/list.go, robot/view.go — Standardized "permission denied" privilege errors across all robot commands.
Tags & Retention:
tag/retention/delete.go, tag/retention/list.go — Standardized flag conflict errors for retention rules.
Users:
user/create.go, user/delete.go, user/list.go, user/password.go — Standardized "permission denied" privilege errors.
user/elevate.go — Lowercased the user confirmation and permission errors.
pkg/api/quota_handler.go — Standardized unexpected reference type errors (preserving Ref capitalization).
pkg/api/retention_handler.go — Lowercased missing retention policy errors.
pkg/views/member/create/view.go — Lowercased empty username validation errors.
pkg/views/quota/list/view.go — Standardized unexpected reference type errors.
✅ Verification
Compilation: Built successfully using go build.
Tests: Verified that the entire test suite passes (go test ./... returns ok).
Preservation: Verified that acronyms and specific identifiers within these files were carefully preserved to ensure no test assertions or semantic meaning was altered.